//
//  NMPOScanResultInfoCell.swift
//  NMPO
//
//  Created by PowerfullClean on 2023/10/31.
//

import UIKit

class NMPOScanResultInfoCell: UICollectionViewCell {
    override init(frame: CGRect) {
        super.init(frame: frame)
        contentView.addSubview(nmpo_iconView1)
        contentView.addSubview(nmpo_iconView3)
        contentView.addSubview(nmpo_iconView2)
       
        nmpo_iconView1.snp.makeConstraints { make in
            make.size.equalTo(172)
            make.top.left.equalToSuperview()
        }
        nmpo_iconView2.snp.makeConstraints { make in
            make.centerY.equalToSuperview()
            make.left.equalToSuperview().offset(12)
            make.size.equalTo(112)
        }
        nmpo_iconView3.snp.makeConstraints { make in
            make.right.centerY.equalToSuperview()
            make.height.equalTo(132)
            make.left.equalTo(nmpo_iconView2.snp.centerX)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    let nmpo_w = nmpo_SCREEN_WIDTH-40-112-12
    lazy var nmpo_iconView1: UIImageView = {
        let nmpo_iconView = UIImageView(image: UIImage(named: "nmpo_result_testInfoBg"))
        return nmpo_iconView
    }()
    lazy var nmpo_iconView2: UIImageView = {
        let nmpo_iconView = UIImageView(image: UIImage(named: "nmpo_result_testSpeed"))
        return nmpo_iconView
    }()
    lazy var nmpo_iconView3: UIImageView = {
        let nmpo_iconView = UIImageView(image: UIImage(named: "nmpo_result_testInfo"))
        return nmpo_iconView
    }()
}
class NMPOTestResultInfoItemView: UIView {
    override init(frame: CGRect) {
        super.init(frame: frame)
        addSubview(nmpo_titleLabel)
        addSubview(nmpo_valueLabel)
        
        nmpo_titleLabel.snp.makeConstraints { make in
            make.centerX.equalToSuperview()
            make.top.equalToSuperview().offset(14)
        }
        nmpo_valueLabel.snp.makeConstraints { make in
            make.width.equalToSuperview()
            make.bottom.equalToSuperview().offset(-10)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    lazy var nmpo_titleLabel: UILabel = {
        let nmpo_titleLabel = UILabel()
        nmpo_titleLabel.font = UIFont.systemFont(ofSize: 12)
        nmpo_titleLabel.textColor = NMPOCommon.nmpo_getHXColorValue(rgb: 0x878787)
        nmpo_titleLabel.text = "Download"
        return nmpo_titleLabel
    }()
    lazy var nmpo_valueLabel: UILabel = {
        let nmpo_valueLabel = UILabel()
        nmpo_valueLabel.font = UIFont.systemFont(ofSize: 14)
        nmpo_valueLabel.textColor = NMPOCommon.nmpo_getHXColorValue(rgb: 0xFFFFFF)
        nmpo_valueLabel.text = "Download"
        nmpo_valueLabel.textAlignment = .center
        return nmpo_valueLabel
    }()
}
